
var vm = new Vue({
    el : "#jobOrder",
    data: {
        table: null,
        listTable: null,
        planCode: null
    },
    ready: function(){
        var _self = this;
        layui.use(['table', 'layer', 'form'], function() {
            _self.table = layui.table;
            layer = layui.layer;

            _self.listTable = _self.table.render({
                elem: '#JoborderPhotoList'
                ,height: 'full-60'
                ,cols: [[ //标题栏
                    {fixed:'left',type:'numbers',title:'序号'}
                    ,{field: 'PHOTO', title: '矢量图包编码',width:150,align:'center'}
                    ,{field: 'PLANCODE', title: '工单号',minWidth:140,width:150,align:'center'}
                    ,{field: 'WLCODE', title: '型体',minWidth:120,width:150, align:'center' }
                    ,{field: 'BWNAME', title: '部位',minWidth:120,width:150, align:'center' }
                    ,{field: 'TEXT', title: '投影标识',minWidth:120,width:220, align:'center' }
                    ,{field: 'TIMES', title: '裁断时间',minWidth:120,width:170, align:'center' }
                    ,{field: 'ZYSTATUS', title: '分拣状态',minWidth:120,width:200, align:'center' }
                ]],
                method: "post",
                url: host + "CuttingJobsr/getJobOrderLists"
                ,page: true //是否显示分页
                ,limits: [10, 20, 50]
                ,limit: 15 //每页默认显示的数量
            });
        });
        _self.form = layui.form;
    },
    methods: {
        /*条件查询*/
        searchData: function(event) {
            if (event && event.keyCode != 13) {
                return;
            }

            this.listTable.reload({page: {curr: 1}, where: {planCode: this.planCode}});
        },
        reset:function(data){
            window.location.reload();
        },
        vueAlert:function(msg){
            layui.use(['form'], function(){
                var layer = layui.layer;
                layer.msg(msg,{icon:6,time:2000});
            });
        },
        eset: function(data){
            window.location.reload();
        },
        vueAlert: function(msg){
            layui.use(['form'], function(){
                var layer = layui.layer;
                layer.msg(msg,{icon:6,time:2000});
            });
        }
    }
});